<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddMoreSettingsToUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->integer('search_time')->default(10)->comment('搜索频繁暂停时间');
            $table->integer('add_time')->default(10)->comment('添加频繁暂停时间');
            $table->integer('add_per_num')->default(10)->comment('每轮添加次数');
            $table->integer('cycle_delay')->default(10)->comment('每轮间隔时间');
            $table->integer('daily_card_num')->default(10)->comment('名片推送数量');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
          $table->dropColumn('search_time');
          $table->dropColumn('add_time');
          $table->dropColumn('add_per_num');
          $table->dropColumn('cycle_delay');
          $table->dropColumn('daily_card_num');
        });
    }
}
